package seentao.stdev.mobile.webuser.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

import org.hibernate.validator.constraints.NotEmpty;

import seentao.stdev.mobile.base.vo.BaseVO;

@NoArgsConstructor
@RequiredArgsConstructor
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name="t_users")
public class WebUser extends BaseVO {
	
	private static final long serialVersionUID = 1L;
	
	public static final int MANAGER = 0;
	public static final int STUDENT = 1;
	public static final int TEACHER = 2;

	/**用户账号*/
	@NonNull
	@Column(name="account", length=50, unique=true)
	@NotEmpty(message = "用户账号不能为空")
	private String account;

	/**密码*/
	@NonNull
	@Column(name="passwd", length=50)
	@NotEmpty(message = "密码不能为空")
	private String password;

	/**是否可用*/
	@Column(name="is_enable")
	private Boolean enable = true;

	/**用户名*/
	@Column(name="user_name", length=50)
	private String username;

	/**用户类型*/
	@Column(name="user_type", length=1)
	private Integer usertype;

}
